<?php

namespace App\Http\Controllers;

use App\Model\Article;
use App\Model\QA;
use Illuminate\Http\Request;

class WebController
{
    public function article(Request $request)
    {
        $key = $request->input('article_key');
        $res = Article::query()->where('article_key', $key)->first();

        return view('h5', $res);
    }

    public function qa(Request $request)
    {
        $key = $request->input('id');
        $res = QA::query()->where('id', $key)->first();

        return view('h5', $res);
    }
}
